package dm;

/**
 * <p>Title: Domain Model Generator</p>
 *
 * <p>Description: Automatic generation of a domain model</p>
 *
 * <p>Copyright: Copyright (c) 2011</p>
 *
 * <p>Company: UTA</p>
 *
 * @author David Kung
 * @version 1.0
 */
public class Nouns
    extends DMComp {
  public Nouns(String fileName, String leftMarker) {
    super(fileName, leftMarker);
  }
  public String[] tryThese(String item) {
    char c = item.toLowerCase().charAt(item.length() - 1);
    if (c == 's' || c == 'x')
      item = item + "es";
    else
    if (c == 'y')
        item = item.substring(0, item.length()-1)+"ies";
      else
        item = item+"s";
    return new String[] {item};
  }
}
